package tgc.edu.exam.service;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.exam.custom.CommonService;
import tgc.edu.exam.entity.SysDept;
import tgc.edu.exam.repository.SysDeptRepository;

@Service
public class SysDeptService extends CommonService<SysDept, UUID>{
	@Autowired
	private SysDeptRepository sysDeptDAO;

	public List<SysDept> findByParentIsNullOrderByIdx1() {
		return sysDeptDAO.findByParentIsNullOrderByIdx1();
	}

	public List<SysDept> findByParent_id(UUID id) {
		return sysDeptDAO.findByParent_id(id);
		
	}
}
